# generated with cmake/gen_cmake_skeleton.py, DO NOT MODIFY.
set(PUBLIC_HEADERS
    arpa-file-parser.h
    arpa-lm-compiler.h
    const-arpa-lm.h
    kaldi-rnnlm.h
    mikolov-rnnlm-lib.h
)

add_library(kaldi-lm
    arpa-file-parser.cc
    arpa-lm-compiler.cc
    const-arpa-lm.cc
    kaldi-rnnlm.cc
    mikolov-rnnlm-lib.cc
)

target_include_directories(kaldi-lm PUBLIC 
     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
     $<INSTALL_INTERFACE:include/kaldi>
)

target_link_libraries(kaldi-lm PUBLIC
    kaldi-fstext
    kaldi-util
    kaldi-matrix
    kaldi-base
    -lcblas
    -llapack
)

if(KALDI_BUILD_TEST)
    add_kaldi_test_executable(NAME arpa-file-parser-test SOURCES arpa-file-parser-test.cc DEPENDS kaldi-lm)
    add_kaldi_test_executable(NAME arpa-lm-compiler-test SOURCES arpa-lm-compiler-test.cc DEPENDS kaldi-lm)
endif()

install(TARGETS kaldi-lm
    EXPORT kaldi-targets
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT kaldi
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT kaldi
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT kaldi
)
install(FILES ${PUBLIC_HEADERS} DESTINATION include/kaldi/lm COMPONENT kaldi)

